/*
 * XML Type:  MessageIdType
 * Namespace: http://docs.oasis-open.org/wsrm/2004/06/ws-reliability-1.1.xsd
 * Java type: cgl.narada.wsinfra.schemas.wsr.MessageIdType
 *
 * Automatically generated - do not modify.
 */
package cgl.narada.wsinfra.schemas.wsr.impl;
/**
 * An XML MessageIdType(@http://docs.oasis-open.org/wsrm/2004/06/ws-reliability-1.1.xsd).
 *
 * This is a complex type.
 */
public class MessageIdTypeImpl extends cgl.narada.wsinfra.schemas.wsr.impl.EmptyTypeImpl implements cgl.narada.wsinfra.schemas.wsr.MessageIdType
{
    
    public MessageIdTypeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SEQUENCENUM$0 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrm/2004/06/ws-reliability-1.1.xsd", "SequenceNum");
    private static final javax.xml.namespace.QName GROUPID$2 = 
        new javax.xml.namespace.QName("", "groupId");
    
    
    /**
     * Gets the "SequenceNum" element
     */
    public cgl.narada.wsinfra.schemas.wsr.SequenceNumType getSequenceNum()
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.SequenceNumType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.SequenceNumType)get_store().find_element_user(SEQUENCENUM$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "SequenceNum" element
     */
    public boolean isSetSequenceNum()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(SEQUENCENUM$0) != 0;
        }
    }
    
    /**
     * Sets the "SequenceNum" element
     */
    public void setSequenceNum(cgl.narada.wsinfra.schemas.wsr.SequenceNumType sequenceNum)
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.SequenceNumType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.SequenceNumType)get_store().find_element_user(SEQUENCENUM$0, 0);
            if (target == null)
            {
                target = (cgl.narada.wsinfra.schemas.wsr.SequenceNumType)get_store().add_element_user(SEQUENCENUM$0);
            }
            target.set(sequenceNum);
        }
    }
    
    /**
     * Appends and returns a new empty "SequenceNum" element
     */
    public cgl.narada.wsinfra.schemas.wsr.SequenceNumType addNewSequenceNum()
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.SequenceNumType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.SequenceNumType)get_store().add_element_user(SEQUENCENUM$0);
            return target;
        }
    }
    
    /**
     * Unsets the "SequenceNum" element
     */
    public void unsetSequenceNum()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(SEQUENCENUM$0, 0);
        }
    }
    
    /**
     * Gets the "groupId" attribute
     */
    public java.lang.String getGroupId()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(GROUPID$2);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "groupId" attribute
     */
    public cgl.narada.wsinfra.schemas.wsr.MIDType xgetGroupId()
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.MIDType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.MIDType)get_store().find_attribute_user(GROUPID$2);
            return target;
        }
    }
    
    /**
     * Sets the "groupId" attribute
     */
    public void setGroupId(java.lang.String groupId)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(GROUPID$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(GROUPID$2);
            }
            target.setStringValue(groupId);
        }
    }
    
    /**
     * Sets (as xml) the "groupId" attribute
     */
    public void xsetGroupId(cgl.narada.wsinfra.schemas.wsr.MIDType groupId)
    {
        synchronized (monitor())
        {
            check_orphaned();
            cgl.narada.wsinfra.schemas.wsr.MIDType target = null;
            target = (cgl.narada.wsinfra.schemas.wsr.MIDType)get_store().find_attribute_user(GROUPID$2);
            if (target == null)
            {
                target = (cgl.narada.wsinfra.schemas.wsr.MIDType)get_store().add_attribute_user(GROUPID$2);
            }
            target.set(groupId);
        }
    }
}
